include ../common.mk

CFLAGS_DC1394 = -I/usr/local/include/ -I/usr/include/

if test -f /usr/lib/libdc1394.a; then LDFLAGS_DC1394 = /usr/lib/libdc1394.a; else LDFLAGS_DC1394 = /usr/local/lib/libdc1394.a; fi

CFLAGS = $(CFLAGS_STD) $(CFLAGS_COMMON) $(CFLAGS_GLIB) $(CFLAGS_LCM) $(CFLAGS_LCMTYPES) $(DC1394_INCLUDES) -D_GNU_SOURCE
LDFLAGS = $(LDFLAGS_STD) $(LDFLAGS_COMMON) $(LDFLAGS_GLIB) $(LDFLAGS_LCM) $(LDFLAGS_LCMTYPES) $(LDFLAGS_DC1394)

#GCC = gcc -Wall -g -std=gnu99 -D_REENTRANT -fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wno-unused-parameter -Wno-format-zero-length

IMGSRC_OBJS = image_source.o image_source_v4l2.o image_source_dc1394.o url_parser.o image_source_islog.o
LIBIMGSRC=$(LIB_PATH)/libimagesource.a

ALL = $(LIBIMGSRC)

all: $(ALL)


$(LIBIMGSRC): $(IMGSRC_OBJS)
	ar rc $@ $(IMGSRC_OBJS) $(LDFLAGS_DC1394)

clean:
	rm -f *~ *.o $(LIBIMGSRC)

